package pers.jassor.service;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import pers.jassor.entities.Dept;

//@FeignClient("SPRINGCLOUD-DEPT")
@FeignClient(value = "SPRINGCLOUD-DEPT", fallbackFactory = DeptClientServiceFallbackFactory.class)
public interface DeptClientService {

	@GetMapping("/dept/{id}")
	Dept get(@PathVariable("id") Long id);
	
	@GetMapping("/dept")
	List<Dept> list();
	
	@PostMapping("/dept")
	boolean add(Dept dept);
	
}
